from flask_sqlalchemy import SQLAlchemy

db = SQLAlchemy()

class UserModel(db.Model):
    uid = db.Column(db.Integer,primary_key=True,autoincrement=True,comment="用户ID")
    username = db.Column(db.String(32),nullable=False,default="",comment="用户名")
    mobile = db.Column(db.String(11),nullable=False,default="",comment="手机号")
    password = db.Column(db.String(64),nullable=False,default="",comment="密码")
    avatar = db.Column(db.String(128),nullable=False,default="",comment="头像")
    balance = db.Column(db.DECIMAL(10,2),nullable=False,default=0,comment="余额")


